﻿using System;
using System.Windows.Forms;

namespace FWF.Logging.Viewer
{
    /// <summary>
    /// 
    /// </summary>
    public partial class frmException : Form
    {

        #region Constructors / Finalizer

        /// <summary>
        /// Initializes a new instance of the <see cref="frmException" /> class.
        /// </summary>
        public frmException()
        {
            InitializeComponent();
        }

        #endregion

        /// <summary>
        /// Gets or sets the message.
        /// </summary>
        /// <value>The message.</value>
        public string Message
        {
            get
            {
                return lblFriendlyMessage.Text;
            }
            set
            {
                lblFriendlyMessage.Text = value;
            }
        }

        /// <summary>
        /// Gets or sets the exception.
        /// </summary>
        /// <value>The exception.</value>
        public Exception Exception
        {
            get
            {
                return null;
            }
            set
            {
                txtDetails.Text = ExceptionLib.FormatException(value);
            }
        }

        /// <summary>
        /// Handles the Click event of the btnContinue control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        private void btnContinue_Click(object sender, EventArgs e)
        {
            Close();
        }

    }
}
